#ifndef _H_BASE_DEFINE_
#define _H_BASE_DEFINE_


#include "log.h"

#define net_socket int
#define NET_INVALID_SOCKET ((net_socket)(~0))
#define NET_GetLastError()	errno

/*#define bool char*/
#define true 1
#define false 0
#define atom_compare_and_swap __sync_val_compare_and_swap
#define atom_fetch_add __sync_fetch_and_add
#define atom_inc(lock) __sync_add_and_fetch(lock, 1)
#define atom_dec(lock) __sync_add_and_fetch(lock, -1)
#define atom_set __sync_lock_test_and_set
#define atom_or_fetch __sync_or_and_fetch
#define atom_and_fetch __sync_and_and_fetch

#define __ENTER_FUNCTION	/*printf("%s,%s,%d\n",__FILE__,__func__,__LINE__);*/

#define __LEAVE_FUNCTION



#endif
